package com.indusfo.spc.pda.controller;

import com.indusfo.spc.pda.pojo.CallmatDosing;
import com.indusfo.spc.pda.service.CallmatDosingService;
import com.indusfo.spc.vo.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @ClassName CallmatDosingController
 * @Description 超市叫料控制层
 * @Author louk
 * @Date 2019/12/20 11:05
 */
@Controller
@RequestMapping("/pda/callmatDosing")
public class CallmatDosingController {

    @Resource
    CallmatDosingService callmatDosingService;

    /**
     * 新增超市叫料
     * @param callmatDosing
     * @return
     */
    @ResponseBody
    @RequestMapping("insertCallmatDosing")
    public JSONObject insertCallmatDosing(CallmatDosing callmatDosing){
        return callmatDosingService.insertCallmatDosing(callmatDosing);
    }

    /**
     * 查询未叫料记录
     * @return
     */
    @ResponseBody
    @RequestMapping("queryNotCallmatDosing")
    public JSONObject queryNotCallmatDosing(CallmatDosing callmatDosing){
        return callmatDosingService.queryNotCallmatDosing(callmatDosing);
    }

    /**
     * 扫描条码来获取到物料编号,物料名称
     * @param matNo
     * @return
     */
    @RequestMapping("queryCallmat")
    @ResponseBody
    public JSONObject queryCallmat(String matNo){

        return callmatDosingService.queryCallmat(matNo);
    }


}
